/**
 * @author SaoE
 * @date 2025/2/21 10:51
 */
public class _104 {
    public int maxDepth(TreeNode root) {
        return inorder(root);
    }

    public int inorder(TreeNode root) {
        if (root == null) {
            return 0;
        }
        int left = inorder(root.left);
        int right = inorder(root.right);
        return Math.max(left, right) + 1;
    }
}




